{#<!DOCTYPE html>#}
{#<html lang="zh-CN">#}
{#<head>#}
{#    <meta charset="UTF-8">#}
{#    <meta name="viewport" content="width=device-width, initial-scale=1.0">#}
{#    <title>试卷列表</title>#}
{#    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/style.css') }}">#}
{#</head>#}
{#<body>#}
{#    <h1>试卷列表</h1>#}
{#    {% for exam in papers %}#}
{#    <div class="exam">#}
{#        <h2>{{ exam.title }}</h2>#}
{#        <p>{{ exam.description }}</p>#}
{#        <h3>题目列表:</h3>#}
{#        <ol> <!-- 使用有序列表显示题目 -->#}
{#            {% for question in exam.questions %}#}
{#            <li>#}
{#                <p>{{ question.question_text }}</p>#}
{#                <form method="post" action="{{ url_for('submit_answer', question_id=question.id) }}">#}
{#                    <div>#}
{#                        <input type="radio" id="option_a_{{ question.id }}" name="answer" value="A">#}
{#                        <label for="option_a_{{ question.id }}">{{ question.option_a }}</label>#}
{#                    </div>#}
{#                    <div>#}
{#                        <input type="radio" id="option_b_{{ question.id }}" name="answer" value="B">#}
{#                        <label for="option_b_{{ question.id }}">{{ question.option_b }}</label>#}
{#                    </div>#}
{#                    <div>#}
{#                        <input type="radio" id="option_c_{{ question.id }}" name="answer" value="C">#}
{#                        <label for="option_c_{{ question.id }}">{{ question.option_c }}</label>#}
{#                    </div>#}
{#                    <div>#}
{#                        <input type="radio" id="option_d_{{ question.id }}" name="answer" value="D">#}
{#                        <label for="option_d_{{ question.id }}">{{ question.option_d }}</label>#}
{#                    </div>#}
{#                </form>#}
{#            </li>#}
{#            {% endfor %}#}
{#        </ol>#}
{#    </div>#}
{#    {% endfor %}#}
{#</body>#}
{#</html>#}
<!-- templates/exam_list.html -->

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>试卷列表</title>
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
    <h1>试卷列表</h1>
    <table>
        <thead>
            <tr>
                <th>ID</th>
                <th>题目内容</th>
                <th>编辑</th>
            </tr>
        </thead>
        <tbody>
            {% if questions %}
                {% for question in questions %}
                <tr>
                    <td>{{ question.id }}</td>
                    <td>{{ question.question_text }}</td>
                    <td><a href="{{ url_for('edit_exam_question', question_id=question.id) }}">编辑</a></td>
                </tr>
                {% endfor %}
            {% else %}
                <tr>
                    <td colspan="3">没有找到任何题目。</td>
                </tr>
            {% endif %}
        </tbody>
    </table>

    <form action="{{ url_for('preview_exam', paper_id=exam_id) }}" method="GET">
        <button type="submit">预览试卷</button>
    </form>
</body>
</html>
